<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
    <meta name="author" content="http://jeesite.com/"/>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=8,IE=9,IE=10"/>
    <meta http-equiv="Expires" content="0">
    <meta http-equiv="Cache-Control" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store">
    <script src="/static/jquery/jquery-3.4.0.min.js" type="text/javascript"></script>
    <link href="/static/bootstrap/2.3.1/css_cerulean/bootstrap.min.css"
          type="text/css" rel="stylesheet"/>
    <script src="/static/bootstrap/2.3.1/js/bootstrap.min.js" type="text/javascript"></script>
    <link href="/static/bootstrap/2.3.1/awesome/font-awesome.min.css" type="text/css" rel="stylesheet"/>
    <link href="/static/jquery-select2/3.4/select2.min.css" rel="stylesheet"/>
    <script src="/static/jquery-select2/3.4/select2.min.js" type="text/javascript"></script>
    <link href="/static/jquery-validation/1.11.0/jquery.validate.min.css" type="text/css" rel="stylesheet"/>
    <script src="/static/jquery-validation/1.19.0/jquery.validate.min.js" type="text/javascript"></script>
    <link href="/static/jquery-jbox/2.3/Skins/Bootstrap/jbox.min.css" rel="stylesheet"/>
    <script src="/static/jquery-jbox/2.3/jquery.jBox-2.3.min.js" type="text/javascript"></script>
    <script src="/static/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script src="/static/common/mustache.min.js" type="text/javascript"></script>
    <link href="/static/common/jeesite.min.css" type="text/css" rel="stylesheet"/>
    <script src="/static/common/jeesite.min.js" type="text/javascript"></script>
    <link rel="Stylesheet" href="/static/jerichotab/css/jquery.jerichotab.css"/>
    <script type="text/javascript" src="/static/jerichotab/js/jquery.jerichotab.js"></script>
    <title>修改菜单</title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#name").focus();
            $("#inputForm").validate({
                submitHandler: function (form) {
                    loading('正在提交，请稍等...');
                    form.submit();
                },
                errorContainer: "#messageBox",
                errorPlacement: function (error, element) {
                    $("#messageBox").text("输入有误，请先更正。");
                    if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
                        error.appendTo(element.parent().parent());
                    } else {
                        error.insertAfter(element);
                    }
                }
            });
        });
    </script>
</head>
<body>
<ul class="nav nav-tabs">
    <li class="active">
        <a href="/sys/menu/form?id=${menu.id}&parent.id=${menu.parent.id}">
            菜单<span th:text="${menu.id!=''?'修改':'添加'}"></span>
        </a>
    </li>
</ul>
<br/>
<form id="inputForm" method="post" th:action="'/menu/update/'+${id}" class="form-horizontal">
    <input type="hidden" name="id" id="id" th:value="${id}"/>
    <input type="hidden" name="parentid" id="parentid" th:value="${parentid}"/>
    <div class="control-group">
        <label class="control-label">上级菜单:</label>
        <div class="controls">
            <!--<sys:treeselect id="menu" name="parent.id" value="${menu.parent.id}" labelName="parent.name"-->
            <!--labelValue="${menu.parent.name}"-->
            <!--title="菜单" url="/sys/menu/treeData" extId="${menu.id}" cssClass="required"/>-->
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">名称:</label>
        <div class="controls">
            <input name="name" id="name" class="required input-xlarge" th:value="${menu.name}"/>
            <span class="help-inline"><font color="red">*</font> </span>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">链接:</label>
        <div class="controls">
            <input name="url" id="url" class="input-xxlarge" th:value="${menu.url}"/>
            <span class="help-inline">点击菜单跳转的页面</span>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">图标:</label>
        <div class="controls">
            <!--<sys:iconselect id="icon" name="icon" value="${menu.icon}"/>-->
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">排序:</label>
        <div class="controls">
            <input name="sort" id="sort" class="required digits input-small" th:value="${menu.sort}"/>
            <span class="help-inline">排列顺序，升序。</span>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">可见:</label>
        <div class="controls">
            <input type="radio" th:value="0" name="isshow" th:checked="${menu.isshow=='1'?'true':'false'}"/>:不可见&nbsp;&nbsp;&nbsp;
            <input type="radio" th:value="1" name="isshow" th:checked="${menu.isshow=='1'?'false':'true'}"/>:可见
            <span class="help-inline">该菜单或操作是否显示到系统菜单中</span>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">权限标识:</label>
        <div class="controls">
            <input name="permission" id="permission" class="input-xxlarge" th:value="${menu.permission}"/>
            <span class="help-inline">控制器中定义的权限标识，如：@RequiresPermissions("权限标识")</span>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">备注:</label>
        <div class="controls">
            <textarea name="remarks" id="remarks" rows="3" class="input-xxlarge" th:value="${menu.remarks}">

            </textarea>
        </div>
    </div>
    <div class="form-actions">
        <!--<shiro:hasPermission name="sys:menu:edit">-->
        <input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;
        <!--</shiro:hasPermission>-->
        <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
    </div>
</form>
</body>
</html>